import Calculator from '../components/Calculator'
import {connect} from 'react-redux'
import ClickInput from '../actionCreator/CalAction'

function mapStateToProps(state) {

	return {
		inputValue: state.CalReducer.inputValue,
		time:state.time,
		history:state.CalReducer.history
	}
}

function mapDispatchToProps(dispatch){
	return{
		ButtonClick:(content,text) => {dispatch(ClickInput(content,text))}
	}
}

const CalCountainer = connect(
	mapStateToProps,
	mapDispatchToProps
)(Calculator);

export default CalCountainer;